Application Pool Sample
By: Stephen W. Thomas
Email: swthomas@biztalkgurus.com
Blog: http://www.geekswithblogs.net/sthomas

Included:
ApplicationPoolSample.msi
SourceCode Folder (installed with the MSI. Included just in case the MSI fails)
Read Me.txt

QUICK SETUP:
1.  Run the ApplicationPoolSample.msi file with the following command line call.  
This will install all the source code in a directory called C:\ApplocationPoolSample

MSIEXEC /i ApplicationPoolSample.msi DEPLOY=true

2.  Install the Rule Engine Policies located in the BizTalk.Samples.RuleStore folder.
3. Publish and Deploy your Rule Engine Policy
4.  Enlist and Start the 4 Orchestrations.
5.  Run the BizTalk.Samples.TestForm.exe
6.  If all else fails, look at the SOURCECODE folder under Documentation.


NOTE ON MSI Deployment:
I have received unpredictable results with the MSI deployment.  
The deployment of the BizTalk Assemblies will sometimes fail and not create the send and receive ports.  It relates to the custom pipeline components as best as I can tell.  This happens in about 1 in5 installs.

If this happens, do the following:
1. Open the solution file located at C:\ApplicationPoolSample
2. Rebuild the BizTalk.Samples.WMIHelper project and then the full solution
3. Use the BizTalk Deployment tool to deploy the follow assemblies:
BizTalk.Samples.Schema.dll
BizTalk.Samples.Pipelines.dll
BizTalk.Samples.ApplicationPool1.dll
BizTalk.Samples.ApplicationPool2.dll
4. Create two file receive functions pointing to In\AppPool1 and In\AppPool2.  Set a custom pipeline on each.  One should be recevieJoinApplicationPool1 and the other recevieJoinApplicationPool2.